Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rethrow MissingDataException when needed #8184

Merged
merged 1 commit into from
Mar 22, 2017

Conversation

Rob--W
Copy link
Member

@Rob--W Rob--W commented Mar 22, 2017

@Snuffleupagus Following #8183, I ran grep -r 'catch (' -A 2 and identified some more cases of try-catch where the catch clause should rethrow.

In core/document.js: PDFDocument.prototype.parse accesses a dictionary property, which could throw if the underlying data is not yet available.

In core/obj.js: get Catalog.prototype.metadata calls stream.getBytes, which can throw MissingDataException too when the stream is a ChunkedStream.

In core/document.js: `PDFDocument.prototype.parse` accesses a dictionary
property, which could throw if the underlying data is not yet available.

In core/obj.js: `get Catalog.prototype.metadata` calls
`stream.getBytes`, which can throw MissingDataException too when the
stream is a ChunkedStream.
@Rob--W Rob--W added the core label Mar 22, 2017
@Rob--W Rob--W requested a review from Snuffleupagus March 22, 2017 14:01
@Rob--W
Copy link
Member Author

Rob--W commented Mar 22, 2017

/botio unittest

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_unittest from @Rob--W received. Current queue size: 0

Live output at: http://107.21.233.14:8877/675be5f607b525c/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_unittest from @Rob--W received. Current queue size: 0

Live output at: http://54.215.176.217:8877/5e940bf99215363/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/5e940bf99215363/output.txt

Total script time: 5.68 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Linux)


Failed

Full output at http://107.21.233.14:8877/675be5f607b525c/output.txt

Total script time: 60.00 mins

@Snuffleupagus
Copy link
Collaborator

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/c4dea0b11827440/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.215.176.217:8877/74d662e5dcc36da/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/c4dea0b11827440/output.txt

Total script time: 28.34 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what's up with the Windows bot, but considering that the unit-tests passed earlier and that all tests passed on Linux, this should be fine.

Nice follow-up, thank you for the patch!

@Snuffleupagus Snuffleupagus merged commit 02370f9 into mozilla:master Mar 22, 2017
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
…eeded

Rethrow MissingDataException when needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants